import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Cookies from 'js-cookie'
import { parseTime, resetForm, selectDictLabel } from "@/utils/index"


import noticeToast from '@/components/notice' //这里引入的是js文件
Vue.prototype.$notice = noticeToast;

import Message from './components/Message/index';
Vue.use(Message);

import fireAlarm from './components/fireAlarm/index';
Vue.use(fireAlarm);

import noticeAlarm from './components/noticeAlarm/index';
Vue.use(noticeAlarm);

import './permission' // permission control

import dataV from '@jiaminghi/data-view'

import { getDicts } from "@/api/data";

Vue.prototype.resetForm = resetForm
Vue.prototype.parseTime = parseTime
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.getDicts = getDicts
Vue.use(dataV)

import VueDragResize from "vue-drag-resize" //缩放、拖拽
Vue.component("vue-drag-resize",VueDragResize)
// swiper
import swiper from 'swiper'
import 'swiper/dist/css/swiper.min.css'
Vue.prototype.$swiper = swiper

// moment
import moment from 'moment'
import 'moment/locale/zh-cn'
Vue.prototype.$moment = moment


// 适配flex
import '@/utils/flexible.js';

import Element from 'element-ui';
import '@/styles/element-variables.scss'
Vue.use(Element, { size: Cookies.get('size') || 'small', zIndex: 3000 });
import VueCron from 'vue-cron'
Vue.use(VueCron);

import "@/styles/index.scss"

import BMap from 'vue-baidu-map'

import * as filters from './utils/filter.js'
import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts

Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

Vue.use(BMap, {
  // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
  ak: 'ZSRUISx1teltvqZBo6Y847xeMTc3XkKW'
})

import DialogInfo from './components/DialogInfo/index.vue'
Vue.component(DialogInfo.name, DialogInfo)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')


